#include "p-machine.hh"
#include <algorithm>
#include <iterator>
#include <iostream>
#include <sstream>
#include <string>

using namespace std;

int main(int argc, char **argv) {
  Adventure adventure;

  if(argc >= 2) {
    ostringstream o;
    copy(argv + 1, argv + argc, ostream_iterator<string>(o, " "));
    int ret = prun(adventure, pcode_from_string(o.str()), true);
    cout << "ret = " << ret << endl;
  } else {
    cerr << "Please provide p-code!\n";
  }

  return 0;
}
